﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="RGPWEB.EN.Login" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<link href="../inc/Style/index.css" rel="Stylesheet" type="text/css" />
<script src="../inc/Script/pub.js" type="text/javascript"></script>   
        <script type="text/javascript">
        function CheckLogin() {
            var ret = true;
            var str = "";
            $id("strinfo").innerHTML = "";

            ErrorStr = new Array(); //错误消息

            if (!IsEmpty($id("txt_name").value)) {
                ErrorStr.push("用户名不能为空,请输入用户名!");
            }

            if (!IsEmpty($id("txt_password").value)) {
                ErrorStr.push("密码不能为空,请输入密码!");
            }

            if (!IsEmpty($id("txt_code").value)) {
                ErrorStr.push("验证码不能为空,请输入验证码!");
            }

            if (ErrorStr.length != 0) {
                str = "<ul>";
                for (var i = 0; i < ErrorStr.length; i++) {
                    str = str + "<li>" + ErrorStr[i] + "</li>";
                }
                str = str + "</ul>";
                $id("strinfo").innerHTML = str;
                $id("strinfo").style.display = "block";
                ret = false;
            }
            else {
                $id("strinfo").innerHTML = "";
                $id("strinfo").style.display = "none";
            }

            return ret;
        }
    </script>
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table>
           <tr>
                <td height="18">UserName：</td>
                <td>
                    <asp:TextBox ID="txt_username" runat="server"></asp:TextBox>
                </td>
           </tr>
           <tr>
                <td height="30">PassWord：</td>
                <td>
                    <asp:TextBox ID="txt_password" runat="server" TextMode="Password"></asp:TextBox>
                </td>
           </tr>
           <tr>
                <td height="30">Verification Code：</td>
                <td>
                    <asp:TextBox ID="txt_code" runat="server"></asp:TextBox><img src="../VerifyImage.ashx" alt="看不清,点击更换!" onclick="this.src=this.src+'?'" />
                </td>
           </tr>
            <tr>
                <td colspan="2">
                    <asp:Button ID="btn_login" runat="server" Text="Login" 
                        onclick="btn_login_Click" />
                </td>
           </tr>
        </table>
    </div>
    </form>
</body>
</html>
